export function toNumber(val:any, def = 0){
    let n = Number(val);
    if(isNaN(n)){
        return def;
    }
    return n;
}
